package zjitc.net.Service.imp;

import zjitc.net.Dao.UserDao;
import zjitc.net.Dao.imp.UserDaoImp;
import zjitc.net.Daomain.User;
import zjitc.net.Service.UserService;

import java.util.List;

public class UserServiceImp implements UserService {
     UserDao dao =  new UserDaoImp();
    @Override
    public List<User> FindAll() {
        return dao.FindAll();
    }

    @Override
    public User FindUsernameAndPassword(String username, String password) {
        return dao.FindUsernameAndPassword(username,password);
    }

    @Override
    public int add(User user) {
        return dao.add(user);
    }

    @Override
    public int update(User user) {
        return dao.update(user);
    }

    @Override
    public int delete(int index) {
        return dao.delete(index);
    }
}
